#ifndef LOGGER_H
#define LOGGER_H

#include "d3dUtil.h"

#include <fstream>
#include <string>

#include "BoundingBox.h"

#include "ChessBoard.h"
#include "ChessType.h"

class Logger
{
public:
	~Logger(void);

	static Logger* Instance();
	void LogString(const std::string& str);

	void LogD3DXCOLOR(const D3DXCOLOR& color);

	void LogError(const std::string& str);

	//void LogBoardToConsole(const ChessBoard& board);
	//void LogToConsole(const std::string& str);

	void Log(const D3DXVECTOR3& vec);
	void Log(const std::string& str);
	void Log(const D3DXMATRIX& mat);
	void Log(const D3DXCOLOR& color);
	void Log(const BoundingBox& box);

	template<typename T>
	void LogToConsole(const T& info)
	{
		std::cout<<info<<std::endl;
		m_Logger<<info<<std::endl;
	}
private:
	Logger(void);
	Logger(const Logger&);
	Logger& operator=(const Logger&);
private:
	std::ofstream		m_Logger;
};




#endif
